Component({
    externalClasses: [ "wux-class" ],
    behaviors: [ "wx://form-field" ],
    relations: {
        "../radio/index": {
            type: "child",
            linked: function() {
                this.changeValue();
            },
            linkChanged: function() {
                this.changeValue();
            },
            unlinked: function() {
                this.changeValue();
            }
        }
    },
    properties: {
        value: {
            type: String,
            value: "",
            observer: "changeValue"
        },
        title: {
            type: String,
            value: ""
        },
        label: {
            type: String,
            value: ""
        },
        colors: {
            type: String,
            value: ""
        }
    },
    methods: {
        changeValue: function() {
            var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.data.value, t = this.getRelationNodes("../radio/index");
            t.length > 0 && t.forEach(function(t) {
                t.changeValue(e === t.data.value);
            });
        },
        emitEvent: function(e) {
            this.triggerEvent("change", e);
        }
    }
});